/* 全局样式 */
:root {
    --primary-color: #007AFF;
    --background-color: #F5F5F7;
    --card-background: #FFFFFF;
    --text-color: #1D1D1F;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* 顶部标题样式 */
.header {
    text-align: center;
    padding: 2rem 1rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header p {
    color: #666;
    font-size: 1.1rem;
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 上传区域样式 */
.upload-area {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

/* 按钮样式 */
.upload-btn, .download-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover, .download-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 压缩控制区域样式 */
.compression-controls {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none; /* 兼容 WebKit 浏览器 */
    appearance: none;          /* 标准属性 */
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

/* 预览区域样式 */
.preview-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.preview-box {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 100%;
}

.preview-box h3 {
    text-align: center;
    margin-bottom: 1rem;
}

.preview-box h4 {
    margin-bottom: 0.5rem;
    color: #666;
}

/* 左右对比布局 */
.image-comparison {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 1rem;
}

.image-side {
    flex: 1;
    text-align: center;
}

.image-container {
    margin: 0.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f5f5f7;
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.file-info {
    color: #666;
    font-size: 0.9rem;
}

/* 下载区域样式 */
.download-area {
    text-align: center;
    margin-top: 2rem;
}

/* 响应式适配 */
@media (max-width: 1400px) {
    .preview-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .preview-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .preview-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .preview-container {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
    
    .image-side {
        width: 100%;
    }
}

/* 在现有样式后添加 */
.batch-controls {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.batch-controls .download-btn {
    min-width: 160px;
}

.single-download {
    margin-top: 1rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.compressed-container {
    margin: 1rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.compressed-container img {
    max-width: 100%;
    height: auto;
}

.file-info {
    margin: 0.5rem 0;
    line-height: 1.5;
} 